<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <script src="./lib/vue-router-3.0.1.js"></script>
    <style>
        .header{
            width: 100%;
            height: 50px;
            background-color: red;
        }
        .container{
            display: flex;
            height: 600px
        }
        .left{
            flex: 2;
            background-color: hotpink;
        }
        .right{
            flex: 8;
            background-color: green;
        }
    </style>
</head>
<body>
    <div id="app">
        <router-view ></router-view>
        <div class="container">
            <router-view name="leftBox"></router-view>
            <router-view name="rightBox"></router-view>
        </div>
    </div>
   
    <script>
        let header = { 
            template:"<div class='header'>我是头部header</div>"
        }
        let leftBox = {
            template:"<div class='left'>我是左边盒子</div>"
        }
        let rightBox = {
            template:"<div class='right'>我是右边的盒子</div>"
        }
        const router = new VueRouter({
           routes: [
               {path:'/',components:{
                   "default":header,
                   "leftBox":leftBox,
                   "rightBox":rightBox
               }}
           ]
            
        })
        new Vue({
            el:"#app",
            data:{},
            methods:{},
            router
        })    
    </script>
</body>
</html>